﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JBeamLibrary.VehicleParts.Collections;
using JBeamLibrary.VehicleParts.Elements;

namespace JBeamLibrary.VehicleParts.Groups
{
    public class ThrusterSection : VehicleSection<Thruster>
    {
        #region Fields

        private readonly ThrusterCollection _collection = new ThrusterCollection();

        #endregion

        #region Indexers

        public Thruster this[string nodeId1, string nodeId2]
        {
            get
            {
                return _collection.FirstOrDefault(thruster => thruster.NodeId1.Equals(nodeId1) && thruster.NodeId2.Equals(nodeId2));
            }
        }

        #endregion

        #region CTORs

        public ThrusterSection(VehiclePart part)
            : base(part)
        {

        }

        #endregion

        #region VehicleSection

        public override string Name
        {
            get { return "thrusters"; }
        }

        public override Interfaces.IVehicleGroupCollection<Thruster> ElementCollection
        {
            get { return _collection; }
        }

        #endregion
    }
}
